package result

import "goapi/entity"

var ret entity.JsonResult

func Success(data any) entity.JsonResult {
	ret.Code = 200
	ret.Msg = "Success"
	ret.Data = data
	return ret
}

func Error(code int, msg string, data any) entity.JsonResult {
	ret.Code = code
	ret.Msg = msg
	ret.Data = data
	return ret
}
